#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>

#define FOR(i,a,n) for(int i=a,_n(n);i<_n;++i)
#define REP(i,n) FOR(i,0,n)

using namespace std;

int main()
{
    int a,b,mod;
    while(cin>>a>>b>>mod)
    {
        int t = 1000000000%mod;
        if(b>=mod||t==0)
        {
            puts("2");
            continue;
        }
        a = min(a,mod);
        bool f = true;
        FOR(i,1,a+1)
        {
            if(1LL*i*t%mod+b<mod&&1LL*i*t%mod!=0)
            {
                printf("%d %09d\n",1,i);
                f = false;
                break;
            }
        }
        if(f) puts("2");
    }
	return 0;
}
